<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>查看订单</title>
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body ng-app="orderApp" ng-controller="Ordercontroller">
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
		<a style="margin-left:90%" href="/test/login.html">注销</a>
			<table class="table">
				<thead>
					<tr>
						<th>
							订单号
						</th>
						<th>
							产品
						</th>
						<th>
							客户名
						</th>
						<th>
							状态
						</th>
						<th>
							操作
						</th>
					</tr>
				</thead>
				<tbody>
					<tr class="info" ng-repeat="l in ls">
						<td>
							{{l.id}}
						</td>
						<td>
							{{l.product}}
						</td>
						<td>
							{{l.username}}
						</td>
						<td>
							{{l.statue}}
						</td>
						<td>
							<button type="button" class="btn btn-success" ng-click="update(l)">修改</button>
							<button type="button" class="btn btn-danger" ng-click="deleted(l)">删除</button>
						</td>
					</tr>
				</tbody>
			</table>
			<button type="button" class="btn btn-info" style="margin-left:90%" ng-click="addOrder()">添加订单</button>
		</div>
	</div>
</div>

<!-- 修改订单模态框 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					修改
				</h4>
			</div>
			<div class="modal-body">
				订单号:
				<input type="text" class="form-control" id="orderid"  ng-model="orderid" readonly >
				<br>
				产品:
				<input type="text" class="form-control" id="product"  ng-model="product"  >
				<br>
				客户:
				<input type="text" class="form-control" id="username"  ng-model="username"  >
				<br>
				状态:
				<select class="form-control" ng-model="statue">
  					<option value="完成">完成</option>
					<option value="未完成">未完成</option>
				</select>
				
				
				
				
				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<button type="button" class="btn btn-primary" ng-click="submitOrder()">
					提交更改
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>

<!-- 添加订单模态框 -->
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					添加订单
				</h4>
			</div>
			<div class="modal-body">
				产品:
				<input type="text" class="form-control" id="product1"  ng-model="product1"  >
				<br>
				客户:
				<input type="text" class="form-control" id="username1"  ng-model="username1"  >
				<br>
				状态:
				<select class="form-control" ng-model="statue1">
  					<option value="完成">完成</option>
					<option value="未完成">未完成</option>
				</select>
				
				
				
				
				
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<button type="button" class="btn btn-primary" ng-click="addOrder1()">
					提交更改
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>



<script type="text/javascript" src="/test/js/order.js"></script>
	<script type="text/javascript" src="/test/js/service/orderService.js"></script>
</body>
</html>